<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('企业实时评价结果')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p style="width:98px">关键字：</p>
                                <input type="text" name="keyword"/>
                            </li>
                            <li>
                                                                             资质分类：<select name="post" th:with="type=${@dict.getType('sys_normal_disable')}">
                                        <option value="">全部</option>                                     
							            <option value="注册造价工程师">注册造价工程师</option>
										<option value="项目经理（注册建造师）">项目经理（注册建造师）</option>
										<option value="建设单位项目负责人">建设单位项目负责人</option>
										<option value="注册监理工程师">注册监理工程师</option>
										<option value="总监代表">总监代表</option>
										<option value="专业监理工程师">专业监理工程师</option>
										<option value="监理员">监理员</option>
										<option value="见证员">见证员</option>
								   </select>
                            </li>
                            <li>
                                                                             是否为最新一期：<select name="isOld" th:with="type=${@dict.getType('sys_normal_disable')}">
                                        <option value="0">是</option>                                     
							            <option value="1">否</option>
										<option value="">不限</option>
								   </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:src="@{/js/plugins/datetime/moment.js}"></script>
    <script th:inline="javascript">
    var prefix = ctx + "integrityEvaluation/person";
    
    $(function() {
    	 var options = {
    			url: prefix + "/personStageList",
                modalName: "人员阶段评价",
                columns: [{
	                        field: 'id',
	                        title: '序号',
							formatter: function (value, row, index) {
							
							    return index + 1;
							}
                    	}, 
						{
	                        field: 'guid',
	                        title: '标识符',
							visible: false
	                    }, 
						{
	                        field: 'personGuid',
	                        title: '人员标识符',
							visible: false
	                    }, 
						{
	                        field: 'name',
	                        title: '姓名'
	                    }, 
						{
	                        field: 'idcard',
	                        title: '身份证号'
	                    }, 
						{
	                        field: 'post',
	                        title: '资格分类'
	                    }, 
						{
	                        field: 'avgScore',
	                        title: '阶段平均分',
							formatter: function (value, row, index) {
								value = Number(value).toFixed(2);
								return value;
							}
	                    }, 
						{
	                        field: 'level',
	                        title: '阶段诚信等级'
	                    },
	                    {
	                        field: 'pubDate',
	                        title: '评价日期',
							formatter: function (value, row, index) {
								if($.common.isNotEmpty(value)){
									var strDate = value;
									value =  moment(strDate,'YYYY-MM-DD').format('YYYY-MM-DD');	
								}
								return value;
							}
	                    }]
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>